# Maintainer: JackNapier <jacknapier151@gmail.com>
# Contributor: 

###########
# Godot 3 #
###########
pkgname=(
	"godot3-stable-rc-src"
	##################
	# Godot GDScript #
	##################
	"godot3-stable-rc-bin"
	"godot3-stable-rc-bin32"
	"godot3-stable-rc-export-templates-bin"
	"libgodot3-stable-rc-bin"
	"godot3-stable-rc-web-bin"
	"godot3-stable-rc-headless-bin"
	"godot3-stable-rc-server-bin"
	"godot3-stable-rc-osx-bin"
	"godot3-stable-rc-win32-bin"
	"godot3-stable-rc-win64-bin"
	"godot3-stable-rc-android-bin"
	##############
	# Godot Mono #
	##############
	"godot3-stable-rc-mono-bin"
	"godot3-stable-rc-mono-bin32"
	"godot3-stable-rc-mono-export-templates-bin"
	"libgodot3-stable-rc-mono-bin"
	"godot3-stable-rc-headless-mono-bin"
	"godot3-stable-rc-server-mono-bin"
	"godot3-stable-rc-mono-osx-bin"
	"godot3-stable-rc-mono-win32-bin"
	"godot3-stable-rc-mono-win64-bin"
	)
_pkgver="3.5.3"
_pkgverb=1
#pkgver="${_pkgver}stable.rc${_pkgverb}"
pkgver="${_pkgver}src${_pkgverb}"
pkgrel=1
pkgdesc="Godot3 Game Engine: An advanced, feature packed, multi-platform 2D and 3D game engine."
url="http://www.godotengine.org"
license=("MIT")
groups=(
	"godot-full"
	"godot3"
	"godot35"
	"godot352"
	"godot-legazy"
	"godot-bin"
	"godot-stable-rc"
)
arch=("any")
_monodepends=(
	"mono>=6.12.0"
	"dotnet-sdk"
	"msbuild"
)
depends=(
	"godot-base"
	"alsa-lib"
	"freetype2"
	"glu"
	"libxcursor"
	"libxinerama"
	"mesa"
)
source=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/godot-${_pkgver}-rc${_pkgverb}.tar.xz")
sha512sums=("SKIP")
package_godot3-stable-rc-src(){
	pkgdesc+=" Stable Release Candidate SourceCode"
	groups+=(
		"godot-src"
	)
	install -d "${pkgdir}/opt/godot/src/godot3-stable-rc/"
	cp -r "${srcdir}/godot-${_pkgver}-rc${_pkgverb}/"* "${pkgdir}/opt/godot/src/godot3-stable-rc/"
}

##################
# Godot GDScript #
##################

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/Godot_v${_pkgver}-rc${_pkgverb}_x11.64.zip")
sha512sums+=("SKIP")
package_godot3-stable-rc-bin(){
	pkgdesc+=" Stable Release Candidate Binary Version"
	groups+=(
		"godot-gdscript"
		"godot-standard"
		"godot-standard64"
		"godot-64"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_x11.64" "${pkgdir}/opt/godot/godot3-stable-rc-bin"
	
	install -d "${pkgdir}/usr/bin/"
	ln -s "/opt/godot/godot3-stable-rc-bin" "${pkgdir}/usr/bin/godot3-stable-rc-bin"
	
	install -d "${pkgdir}/usr/share/applications/"
	cat > "${pkgdir}/usr/share/applications/godot3-stable-rc-bin.desktop" <<-EOF
		[Desktop Entry]
		Name=Godot3 Engine Stable Release Candidate Binary v${_pkgver}-stable-rc${_pkgverb}
		GenericName="Advanced cross-platform 2D and 3D libre game engine. Stable Release Candidate Binary Version"
		Comment=Application for making games
		Exec=/usr/bin/godot3-stable-rc-bin %U
		Icon=godot
		Terminal=false
		Type=Application
		MimeType=application/x-godot-project;
		Categories=Development;IDE;
	EOF
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/Godot_v${_pkgver}-rc${_pkgverb}_x11.32.zip")
sha512sums+=("SKIP")
package_godot3-stable-rc-bin32(){
	pkgdesc+=" Stable Release Candidate Binary Version 32b"
	groups+=(
		"godot-gdscript"
		"godot-standard"
		"godot-standard32"
		"godot-32"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_x11.32" "${pkgdir}/opt/godot/godot3-stable-rc-bin32"
	
	install -d "${pkgdir}/usr/bin/"
	ln -s "/opt/godot/godot3-stable-rc-bin32" "${pkgdir}/usr/bin/godot3-stable-rc-bin32"
	
	install -d "${pkgdir}/usr/share/applications/"
	cat > "${pkgdir}/usr/share/applications/godot3-stable-rc-bin32.desktop" <<-EOF
		[Desktop Entry]
		Name=Godot3 Engine Stable Release Candidate Binary v${_pkgver}-stable-rc${_pkgverb} 32b
		GenericName="Advanced cross-platform 2D and 3D libre game engine. Stable Release Candidate Binary Version 32b"
		Comment=Application for making games
		Exec=/usr/bin/godot3-stable-rc-bin32 %U
		Icon=godot
		Terminal=false
		Type=Application
		MimeType=application/x-godot-project;
		Categories=Development;IDE;
	EOF
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/Godot_v${_pkgver}-rc${_pkgverb}_export_templates.tpz")
noextract=("Godot_v${_pkgver}-rc${_pkgverb}_export_templates.tpz")
sha512sums+=("SKIP")
package_godot3-stable-rc-export-templates-bin(){
	pkgdesc+=" Stable Release Candidate Export Templates Binary Version"
	groups+=(
		"godot-gdscript"
		"godot-export-templates"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_export_templates.tpz" "${pkgdir}/opt/godot/godot3-stable-rc-export-templates-bin.tpz"
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/godot-lib.${_pkgver}.rc${_pkgverb}.release.aar")
noextract+=("godot-lib.${_pkgver}.rc${_pkgverb}.release.aar")
sha512sums+=("SKIP")
package_libgodot3-stable-rc-bin(){
	pkgdesc+=" Stable Release Candidate LibGodot Binary Version"
	groups+=(
		"godot-gdscript"
		"godot-lib"
	)
	install -Dm755 "${srcdir}/godot-lib.${_pkgver}.rc${_pkgverb}.release.aar" "${pkgdir}/opt/godot/godot-lib/libgodot3-stable-rc-bin.aar"
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/Godot_v${_pkgver}-rc${_pkgverb}_web_editor.zip")
noextract+=("Godot_v${_pkgver}-rc${_pkgverb}_web_editor.zip")
sha512sums+=("SKIP")
package_godot3-stable-rc-web-bin(){
	pkgdesc+=" Stable Release Candidate Web Binary Version"
	groups+=(
		"godot-gdscript"
		"godot-web"
	)
	unzip "Godot_v${_pkgver}-rc${_pkgverb}_web_editor.zip" -d "${srcdir}/godot3-stable-rc-web-bin.d"
	install -d "${pkgdir}/opt/godot/"
	cp -r "${srcdir}/godot3-stable-rc-web-bin.d" "${pkgdir}/opt/godot/"
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/Godot_v${_pkgver}-rc${_pkgverb}_linux_headless.64.zip")
sha512sums+=("SKIP")
package_godot3-stable-rc-headless-bin(){
	pkgdesc+=" Stable Release Candidate Headless Binary Version"
	groups+=(
		"godot-gdscript"
		"godot-headless"
		"godot-64"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_linux_headless.64" "${pkgdir}/opt/godot/godot3-stable-rc-headless-bin"
	
	install -d "${pkgdir}/usr/bin/"
	ln -s "/opt/godot/godot3-stable-rc-headless-bin" "${pkgdir}/usr/bin/godot3-stable-rc-headless-bin"
	
	install -d "${pkgdir}/usr/share/applications/"
	cat > "${pkgdir}/usr/share/applications/godot3-stable-rc-headless-bin.desktop" <<-EOF
		[Desktop Entry]
		Name=Godot3 Headless Engine Stable Release Candidate Binary v${_pkgver}-stable-rc${_pkgverb}
		GenericName="Advanced cross-platform 2D and 3D libre game engine. Stable Release Candidate Headless Binary Version"
		Comment=Application for making games
		Exec=/usr/bin/godot3-stable-rc-headless-bin %U
		Icon=godot
		Terminal=false
		Type=Application
		MimeType=application/x-godot-project;
		Categories=Development;IDE;
	EOF
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/Godot_v${_pkgver}-rc${_pkgverb}_linux_server.64.zip")
sha512sums+=("SKIP")
package_godot3-stable-rc-server-bin(){
	pkgdesc+=" Stable Release Candidate Server Binary Version"
	groups+=(
		"godot-gdscript"
		"godot-server"
		"godot-64"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_linux_server.64" "${pkgdir}/opt/godot/godot3-stable-rc-server-bin"
	
	install -d "${pkgdir}/usr/bin/"
	ln -s "/opt/godot/godot3-stable-rc-server-bin" "${pkgdir}/usr/bin/godot3-stable-rc-server-bin"
	
	install -d "${pkgdir}/usr/share/applications/"
	cat > "${pkgdir}/usr/share/applications/godot3-stable-rc-server-bin.desktop" <<-EOF
		[Desktop Entry]
		Name=Godot3 Server Engine Stable Release Candidate Binary v${_pkgver}-stable-rc${_pkgverb}
		GenericName="Advanced cross-platform 2D and 3D libre game engine. Stable Release Candidate Server Binary Version"
		Comment=Application for making games
		Exec=/usr/bin/godot3-stable-rc-server-bin %U
		Icon=godot
		Terminal=false
		Type=Application
		MimeType=application/x-godot-project;
		Categories=Development;IDE;
	EOF
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/Godot_v${_pkgver}-rc${_pkgverb}_osx.universal.zip")
sha512sums+=("SKIP")
package_godot3-stable-rc-osx-bin(){
	pkgdesc+=" Stable Release Candidate MacOSX Binary Version"
	groups+=(
		"godot-gdscript"
		"godot-osx"
		"godot-osx-universal"
	)
	install -Dm755 "${srcdir}/Godot.app/Contents/MacOS/Godot" "${pkgdir}/opt/godot/godot3-stable-rc-osx-bin"
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/Godot_v${_pkgver}-rc${_pkgverb}_win32.exe.zip")
sha512sums+=("SKIP")
package_godot3-stable-rc-win32-bin(){
	pkgdesc+=" Stable Release Candidate Windows Binary Version 32b"
	groups+=(
		"godot-gdscript"
		"godot-win"
		"godot-win32"
		"godot-32"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win32.exe" "${pkgdir}/opt/godot/godot3-stable-rc-win32-bin.exe"
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win32_console.cmd" "${pkgdir}/opt/godot/godot3-stable-rc-win32-bin.cmd"
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/Godot_v${_pkgver}-rc${_pkgverb}_win64.exe.zip")
sha512sums+=("SKIP")
package_godot3-stable-rc-win64-bin(){
	pkgdesc+=" Stable Release Candidate Windows Binary Version 64b"
	groups+=(
		"godot-gdscript"
		"godot-win"
		"godot-win64"
		"godot-64"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win64.exe" "${pkgdir}/opt/godot/godot3-stable-rc-win64-bin.exe"
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win64_console.cmd" "${pkgdir}/opt/godot/godot3-stable-rc-win64-bin.cmd"
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/Godot_v${_pkgver}-rc${_pkgverb}_android_editor.apk")
noextract+=("Godot_v${_pkgver}-rc${_pkgverb}_android_editor.apk")
sha512sums+=("SKIP")
package_godot3-stable-rc-android-bin(){
	pkgdesc+=" Stable Release Candidate Android Binary Version"
	groups+=(
		"godot-gdscript"
		"godot-android"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_android_editor.apk" "${pkgdir}/opt/godot/godot3-stable-rc-android-bin.apk"
}

##############
# Godot Mono #
##############
source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/mono/Godot_v${_pkgver}-rc${_pkgverb}_mono_x11_64.zip")
sha512sums+=("SKIP")
package_godot3-stable-rc-mono-bin(){
	pkgdesc+=" Stable Release Candidate Mono Binary Version"
	depends+=("${_monodepends}")
	groups+=(
		"godot-mono"
		"godot-standard"
		"godot-standard64"
		"godot-64"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_x11_64/Godot_v${_pkgver}-rc${_pkgverb}_mono_x11.64" "${pkgdir}/opt/godot/godot3-stable-rc-mono-bin.d/godot3-stable-rc-mono-bin"
	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_x11_64/GodotSharp" "${pkgdir}/opt/godot/godot3-stable-rc-mono-bin.d/GodotSharp"
	ln -s "/opt/godot/godot3-stable-rc-mono-bin.d/godot3-stable-rc-mono-bin" "${pkgdir}/opt/godot/godot3-stable-rc-mono-bin"
	
	install -d "${pkgdir}/usr/bin/"
	ln -s "/opt/godot/godot3-stable-rc-mono-bin.d/godot3-stable-rc-mono-bin" "${pkgdir}/usr/bin/godot3-stable-rc-mono-bin"
	
	install -d "${pkgdir}/usr/share/applications/"
	cat > "${pkgdir}/usr/share/applications/godot3-stable-rc-mono-bin.desktop" <<-EOF
		[Desktop Entry]
		Name=Godot3 Engine Stable Release Candidate Mono Binary v${_pkgver}-stable-rc${_pkgverb}
		GenericName="Advanced cross-platform 2D and 3D libre game engine. Stable Release Candidate Mono Binary Version"
		Comment=Application for making games.
		Exec=/usr/bin/godot3-stable-rc-mono-bin %U
		Icon=godot
		Terminal=false
		Type=Application
		MimeType=application/x-godot-project;
		Categories=Development;IDE;
	EOF
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/mono/Godot_v${_pkgver}-rc${_pkgverb}_mono_x11_32.zip")
sha512sums+=("SKIP")
package_godot3-stable-rc-mono-bin32(){
	pkgdesc+=" Stable Release Candidate Mono Binary Version 32b"
	depends+=("${_monodepends}")
	groups+=(
		"godot-mono"
		"godot-standard"
		"godot-standard32"
		"godot-32"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_x11_32/Godot_v${_pkgver}-rc${_pkgverb}_mono_x11.32" "${pkgdir}/opt/godot/godot3-stable-rc-mono-bin32.d/godot3-stable-rc-mono-bin32"
	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_x11_32/GodotSharp" "${pkgdir}/opt/godot/godot3-stable-rc-mono-bin32.d/GodotSharp"
	ln -s "/opt/godot/godot3-stable-rc-mono-bin32.d/godot3-stable-rc-mono-bin32" "${pkgdir}/opt/godot/godot3-stable-rc-mono-bin32"
	
	install -d "${pkgdir}/usr/bin/"
	ln -s "/opt/godot/godot3-stable-rc-mono-bin32.d/godot3-stable-rc-mono-bin32" "${pkgdir}/usr/bin/godot3-stable-rc-mono-bin32"
	
	install -d "${pkgdir}/usr/share/applications/"
	cat > "${pkgdir}/usr/share/applications/godot3-stable-rc-mono-bin32.desktop" <<-EOF
		[Desktop Entry]
		Name=Godot3 Engine Stable Release Candidate Mono Binary v${_pkgver}-stable-rc${_pkgverb} 32b
		GenericName="Advanced cross-platform 2D and 3D libre game engine. Stable Release Candidate Mono Binary Version 32b"
		Comment=Application for making games.
		Exec=/usr/bin/godot3-stable-rc-mono-bin32 %U
		Icon=godot
		Terminal=false
		Type=Application
		MimeType=application/x-godot-project;
		Categories=Development;IDE;
	EOF
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/mono/Godot_v${_pkgver}-rc${_pkgverb}_mono_export_templates.tpz")
noextract+=("Godot_v${_pkgver}-rc${_pkgverb}_mono_export_templates.tpz")
sha512sums+=("SKIP")
package_godot3-stable-rc-mono-export-templates-bin(){
	pkgdesc+=" Stable Release Candidate Export Templates Mono Binary Version"
	groups+=(
		"godot-mono"
		"godot-export-templates"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_export_templates.tpz" "${pkgdir}/opt/godot/Godot3-stable-rc-mono-export-templates-bin.tpz"
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/mono/godot-lib.${_pkgver}.rc${_pkgverb}.mono.release.aar")
noextract+=("godot-lib.${_pkgver}.rc${_pkgverb}mono.release.aar")
sha512sums+=("SKIP")
package_libgodot3-stable-rc-mono-bin(){
	pkgdesc+=" Stable Release Candidate LibGodot Mono Binary Version"
	groups+=(
		"godot-mono"
		"godot-lib"
	)
	install -Dm755 "${srcdir}/godot-lib.${_pkgver}.rc${_pkgverb}.mono.release.aar" "${pkgdir}/opt/godot/godot-lib/libgodot3-stable-rc-mono-bin.aar"
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/mono/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_headless_64.zip")
sha512sums+=("SKIP")
package_godot3-stable-rc-headless-mono-bin(){
	pkgdesc+=" Stable Release Candidate Headless Mono Binary Version"
	depends+=("${_monodepends}")
	groups+=(
		"godot-mono"
		"godot-headless"
		"godot-64"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_headless_64/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_headless.64" "${pkgdir}/opt/godot/godot3-stable-rc-headless-mono-bin.d/godot3-stable-rc-headless-mono-bin"
	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_headless_64/GodotSharp" "${pkgdir}/opt/godot/godot3-stable-rc-headless-mono-bin.d/GodotSharp"
	ln -s "/opt/godot/godot3-stable-rc-headless-mono-bin.d/godot3-stable-rc-headless-mono-bin" "${pkgdir}/opt/godot/godot3-stable-rc-headless-mono-bin"
	
	install -d "${pkgdir}/usr/bin/"
	ln -s "/opt/godot/godot3-stable-rc-headless-mono-bin.d/godot3-stable-rc-headless-mono-bin" "${pkgdir}/usr/bin/godot3-stable-rc-headless-mono-bin"
	
	install -d "${pkgdir}/usr/share/applications/"
	cat > "${pkgdir}/usr/share/applications/godot3-stable-rc-headless-mono-bin.desktop" <<-EOF
		[Desktop Entry]
		Name=Godot3 Headless Engine Stable Release Candidate Mono Binary v${_pkgver}-stable-rc${_pkgverb}
		GenericName="Advanced cross-platform 2D and 3D libre game engine. Stable Release Candidate Headless Mono Binary Version"
		Comment=Application for making games
		Exec=/usr/bin/godot3-stable-rc-headless-mono-bin %U
		Icon=godot
		Terminal=false
		Type=Application
		MimeType=application/x-godot-project;
		Categories=Development;IDE;
	EOF
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/mono/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_server_64.zip")
sha512sums+=("SKIP")
package_godot3-stable-rc-server-mono-bin(){
	pkgdesc+=" Stable Release Candidate Server Mono Binary Version"
	depends+=("${_monodepends}")
	groups+=(
		"godot-mono"
		"godot-server"
		"godot-64"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_server_64/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_server.64" "${pkgdir}/opt/godot/godot3-stable-rc-server-mono-bin.d/godot3-stable-rc-server-mono-bin"
	install -d "${pkgdir}/opt/godot/godot3-stable-rc-server-mono-bin.d/GodotSharp"
	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_server_64/data_Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_server_64" "${pkgdir}/opt/godot/godot3-stable-rc-server-mono-bin.d/GodotSharp"
	ln -s "/opt/godot/godot3-stable-rc-server-mono-bin.d/godot3-stable-rc-server-mono-bin" "${pkgdir}/opt/godot/godot3-stable-rc-server-mono-bin"
	
	install -d "${pkgdir}/usr/bin/"
	ln -s "/opt/godot/godot3-stable-rc-server-mono-bin.d/godot3-stable-rc-server-mono-bin" "${pkgdir}/usr/bin/godot3-stable-rc-server-mono-bin"
	
	install -d "${pkgdir}/usr/share/applications/"
	cat > "${pkgdir}/usr/share/applications/godot3-stable-rc-server-mono-bin.desktop" <<-EOF
		[Desktop Entry]
		Name=Godot Server Engine Stable Release Candidate Mono Binary v${_pkgver}-stable-rc${_pkgverb}
		GenericName="Advanced cross-platform 2D and 3D libre game engine. Stable Release Candidate Server Mono Binary Version"
		Comment=Application for making games
		Exec=/usr/bin/godot3-stable-rc-server-bin %U
		Icon=godot
		Terminal=false
		Type=Application
		MimeType=application/x-godot-project;
		Categories=Development;IDE;
	EOF
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/mono/Godot_v${_pkgver}-rc${_pkgverb}_mono_osx.universal.zip")
sha512sums+=("SKIP")
package_godot3-stable-rc-mono-osx-bin(){
	pkgdesc+=" Stable Release Candidate MacOSX Mono Binary Version"
	groups+=(
		"godot-mono"
		"godot-osx"
		"godot-osx-universal"
	)
	install -Dm755 "${srcdir}/Godot_mono.app/Contents/MacOS/Godot" "${pkgdir}/opt/godot/godot3-stable-rc-mono-osx-bin.d/godot3-stable-rc-mono-osx-bin"
	cp -r "${srcdir}/Godot_mono.app/Contents/Resources/GodotSharp" "${pkgdir}/opt/godot/godot3-stable-rc-mono-osx-bin.d/GodotSharp"
	ln -s "/opt/godot/godot3-stable-rc-mono-osx-bin.d/godot3-stable-rc-mono-osx-bin" "${pkgdir}/opt/godot/godot3-stable-rc-mono-osx-bin"
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/mono/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32.zip")
sha512sums+=("SKIP")
package_godot3-stable-rc-mono-win32-bin(){
	pkgdesc+=" Stable Release Candidate Windows Mono Binary Version 32b"
	groups+=(
		"godot-mono"
		"godot-win"
		"godot-win32"
		"godot-32"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32.exe" "${pkgdir}/opt/godot/godot3-stable-rc-mono-win32-bin.d/godot3-stable-rc-mono-win32-bin.exe"
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32_console.cmd" "${pkgdir}/opt/godot/godot3-stable-rc-mono-win32-bin.d/godot3-stable-rc-mono-win32-bin.cmd"
	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32/GodotSharp" "${pkgdir}/opt/godot/godot3-stable-rc-mono-win32-bin.d/GodotSharp"
	ln -s "/opt/godot/godot3-stable-rc-mono-win32-bin.d/godot3-stable-rc-mono-win32-bin.exe" "${pkgdir}/opt/godot/godot3-stable-rc-mono-win32-bin.exe"
	ln -s "/opt/godot/godot3-stable-rc-mono-win32-bin.d/godot3-stable-rc-mono-win32-bin.cmd" "${pkgdir}/opt/godot/godot3-stable-rc-mono-win32-bin.cmd"
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/mono/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64.zip")
sha512sums+=("SKIP")
package_godot3-stable-rc-mono-win64-bin(){
	pkgdesc+=" Stable Release Candidate Windows Mono Binary Version 64b"
	groups+=(
		"godot-mono"
		"godot-win"
		"godot-win64"
		"godot-64"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64.exe" "${pkgdir}/opt/godot/godot3-stable-rc-mono-win64-bin.d/godot3-stable-rc-mono-win64-bin.exe"
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64_console.cmd" "${pkgdir}/opt/godot/godot3-stable-rc-mono-win64-bin.d/godot3-stable-rc-mono-win64-bin.cmd"
	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64/GodotSharp" "${pkgdir}/opt/godot/godot3-stable-rc-mono-win64-bin.d/GodotSharp"
	ln -s "/opt/godot/godot3-stable-rc-mono-win64-bin.d/godot3-stable-rc-mono-win64-bin.exe" "${pkgdir}/opt/godot/godot3-stable-rc-mono-win64-bin.exe"
	ln -s "/opt/godot/godot3-stable-rc-mono-win64-bin.d/godot3-stable-rc-mono-win64-bin.cmd" "${pkgdir}/opt/godot/godot3-stable-rc-mono-win64-bin.cmd"
}


#############
# Godot LTS #
#############
pkgname+=(
	"godotlts-stable-rc-src"
	##################
	# Godot GDScript #
	##################
	"godotlts-stable-rc-bin"
	"godotlts-stable-rc-bin32"
	"godotlts-stable-rc-export-templates-bin"
	"libgodotlts-stable-rc-bin"
	"godotlts-stable-rc-web-bin"
	"godotlts-stable-rc-headless-bin"
	"godotlts-stable-rc-server-bin"
	"godotlts-stable-rc-osx-bin"
	"godotlts-stable-rc-win32-bin"
	"godotlts-stable-rc-win64-bin"
	"godotlts-stable-rc-android-bin"
	##############
	# Godot Mono #
	##############
	"godotlts-stable-rc-mono-bin"
	"godotlts-stable-rc-mono-bin32"
	"godotlts-stable-rc-mono-export-templates-bin"
	"libgodotlts-stable-rc-mono-bin"
	"godotlts-stable-rc-headless-mono-bin"
	"godotlts-stable-rc-server-mono-bin"
	"godotlts-stable-rc-mono-osx-bin"
	"godotlts-stable-rc-mono-win32-bin"
	"godotlts-stable-rc-mono-win64-bin"
	)

pkgdesclts="Godot LTS Game Engine: An advanced, feature packed, multi-platform 2D and 3D game engine."

package_godotlts-stable-rc-src(){
	pkgdesc+="${pkgdesclts} LTS Stable Release Candidate SourceCode"
	groups+=(
		"godot-lts"
		"godot-src"
	)
	install -d "${pkgdir}/opt/godot/src/godotlts-stable-rc/"
	cp -r "${srcdir}/godot-${_pkgver}-rc${_pkgverb}/"* "${pkgdir}/opt/godot/src/godotlts-stable-rc/"
}

##################
# Godot GDScript #
##################

package_godotlts-stable-rc-bin(){
	pkgdesc+="${pkgdesclts} LTS Stable Release Candidate Binary Version"
	groups+=(
		"godot-lts"
		"godot-gdscript"
		"godot-standard"
		"godot-standard64"
		"godot-64"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_x11.64" "${pkgdir}/opt/godot/godotlts-stable-rc-bin"
	
	install -d "${pkgdir}/usr/bin/"
	ln -s "/opt/godot/godotlts-stable-rc-bin" "${pkgdir}/usr/bin/godotlts-stable-rc-bin"
	
	install -d "${pkgdir}/usr/share/applications/"
	cat > "${pkgdir}/usr/share/applications/godotlts-stable-rc-bin.desktop" <<-EOF
		[Desktop Entry]
		Name=Godot LTS Engine Stable Release Candidate Binary v${_pkgver}-stable-rc${_pkgverb}
		GenericName="Advanced cross-platform 2D and 3D libre game engine. LTS Stable Release Candidate Binary Version"
		Comment=Application for making games
		Exec=/usr/bin/godotlts-stable-rc-bin %U
		Icon=godot
		Terminal=false
		Type=Application
		MimeType=application/x-godot-project;
		Categories=Development;IDE;
	EOF
}

package_godotlts-stable-rc-bin32(){
	pkgdesc+="${pkgdesclts} LTS Stable Release Candidate Binary Version 32b"
	groups+=(
		"godot-lts"
		"godot-gdscript"
		"godot-standard"
		"godot-standard32"
		"godot-32"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_x11.32" "${pkgdir}/opt/godot/godotlts-stable-rc-bin32"
	
	install -d "${pkgdir}/usr/bin/"
	ln -s "/opt/godot/godotlts-stable-rc-bin32" "${pkgdir}/usr/bin/godotlts-stable-rc-bin32"
	
	install -d "${pkgdir}/usr/share/applications/"
	cat > "${pkgdir}/usr/share/applications/godotlts-stable-rc-bin32.desktop" <<-EOF
		[Desktop Entry]
		Name=Godot LTS Engine Stable Release Candidate Binary v${_pkgver}-stable-rc${_pkgverb} 32b
		GenericName="Advanced cross-platform 2D and 3D libre game engine. LTS Stable Release Candidate Binary Version 32b"
		Comment=Application for making games
		Exec=/usr/bin/godotlts-stable-rc-bin32 %U
		Icon=godot
		Terminal=false
		Type=Application
		MimeType=application/x-godot-project;
		Categories=Development;IDE;
	EOF
}

package_godotlts-stable-rc-export-templates-bin(){
	pkgdesc+="${pkgdesclts} LTS Stable Release Candidate Export Templates Binary Version"
	groups+=(
		"godot-lts"
		"godot-gdscript"
		"godot-export-templates"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_export_templates.tpz" "${pkgdir}/opt/godot/godotlts-stable-rc-export-templates-bin.tpz"
}

package_libgodotlts-stable-rc-bin(){
	pkgdesc+="${pkgdesclts} LTS Stable Release Candidate LibGodot Binary Version"
	groups+=(
		"godot-lts"
		"godot-gdscript"
		"godot-lib"
	)
	install -Dm755 "${srcdir}/godot-lib.${_pkgver}.rc${_pkgverb}.release.aar" "${pkgdir}/opt/godot/godot-lib/libgodotlts-stable-rc-bin.aar"
}

package_godotlts-stable-rc-web-bin(){
	pkgdesc+="${pkgdesclts} LTS Stable Release Candidate Web Binary Version"
	groups+=(
		"godot-lts"
		"godot-gdscript"
		"godot-web"
	)
	unzip "Godot_v${_pkgver}-rc${_pkgverb}_web_editor.zip" -d "${srcdir}/godotlts-stable-rc-web-bin.d"
	install -d "${pkgdir}/opt/godot/"
	cp -r "${srcdir}/godotlts-stable-rc-web-bin.d" "${pkgdir}/opt/godot/"
}

package_godotlts-stable-rc-headless-bin(){
	pkgdesc+="${pkgdesclts} LTS Stable Release Candidate Headless Binary Version"
	groups+=(
		"godot-lts"
		"godot-gdscript"
		"godot-headless"
		"godot-64"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_linux_headless.64" "${pkgdir}/opt/godot/godotlts-stable-rc-headless-bin"
	
	install -d "${pkgdir}/usr/bin/"
	ln -s "/opt/godot/godotlts-stable-rc-headless-bin" "${pkgdir}/usr/bin/godotlts-stable-rc-headless-bin"
	
	install -d "${pkgdir}/usr/share/applications/"
	cat > "${pkgdir}/usr/share/applications/godotlts-stable-rc-headless-bin.desktop" <<-EOF
		[Desktop Entry]
		Name=Godot LTS Headless Engine Stable Release Candidate Binary v${_pkgver}-stable-rc${_pkgverb}
		GenericName="Advanced cross-platform 2D and 3D libre game engine. LTS Stable Release Candidate Headless Binary Version"
		Comment=Application for making games
		Exec=/usr/bin/godotlts-stable-rc-headless-bin %U
		Icon=godot
		Terminal=false
		Type=Application
		MimeType=application/x-godot-project;
		Categories=Development;IDE;
	EOF
}

package_godotlts-stable-rc-server-bin(){
	pkgdesc+="${pkgdesclts} LTS Stable Release Candidate Server Binary Version"
	groups+=(
		"godot-lts"
		"godot-gdscript"
		"godot-server"
		"godot-64"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_linux_server.64" "${pkgdir}/opt/godot/godotlts-stable-rc-server-bin"
	
	install -d "${pkgdir}/usr/bin/"
	ln -s "/opt/godot/godotlts-stable-rc-server-bin" "${pkgdir}/usr/bin/godotlts-stable-rc-server-bin"
	
	install -d "${pkgdir}/usr/share/applications/"
	cat > "${pkgdir}/usr/share/applications/godotlts-stable-rc-server-bin.desktop" <<-EOF
		[Desktop Entry]
		Name=Godot LTS Server Engine Stable Release Candidate Binary v${_pkgver}-stable-rc${_pkgverb}
		GenericName="Advanced cross-platform 2D and 3D libre game engine. LTS Stable Release Candidate Server Binary Version"
		Comment=Application for making games
		Exec=/usr/bin/godotlts-stable-rc-server-bin %U
		Icon=godot
		Terminal=false
		Type=Application
		MimeType=application/x-godot-project;
		Categories=Development;IDE;
	EOF
}

package_godotlts-stable-rc-osx-bin(){
	pkgdesc+="${pkgdesclts} LTS Stable Release Candidate MacOSX Binary Version"
	groups+=(
		"godot-lts"
		"godot-gdscript"
		"godot-osx"
		"godot-osx-universal"
	)
	install -Dm755 "${srcdir}/Godot.app/Contents/MacOS/Godot" "${pkgdir}/opt/godot/godotlts-stable-rc-osx-bin"
}

package_godotlts-stable-rc-win32-bin(){
	pkgdesc+="${pkgdesclts} LTS Stable Release Candidate Windows Binary Version 32b"
	groups+=(
		"godot-lts"
		"godot-gdscript"
		"godot-win"
		"godot-win32"
		"godot-32"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win32.exe" "${pkgdir}/opt/godot/godotlts-stable-rc-win32-bin.exe"
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win32_cmd.cmd" "${pkgdir}/opt/godot/godotlts-stable-rc-win32-bin.cmd"
}

package_godotlts-stable-rc-win64-bin(){
	pkgdesc+="${pkgdesclts} LTS Stable Release Candidate Windows Binary Version 64b"
	groups+=(
		"godot-lts"
		"godot-gdscript"
		"godot-win"
		"godot-win64"
		"godot-64"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win64.exe" "${pkgdir}/opt/godot/godotlts-stable-rc-win64-bin.exe"
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win64.cmd" "${pkgdir}/opt/godot/godotlts-stable-rc-win64-bin.cmd"
}

package_godotlts-stable-rc-android-bin(){
	pkgdesc+="${pkgdesclts} LTS Stable Release Candidate Android Binary Version"
	groups+=(
		"godot-lts"
		"godot-gdscript"
		"godot-android"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_android_editor.apk" "${pkgdir}/opt/godot/godotlts-stable-rc-android-bin.apk"
}

##############
# Godot Mono #
##############

package_godotlts-stable-rc-mono-bin(){
	pkgdesc+="${pkgdesclts} LTS Stable Release Candidate Mono Binary Version"
	depends+=("${_monodepends}")
	groups+=(
		"godot-lts"
		"godot-mono"
		"godot-standard"
		"godot-standard64"
		"godot-64"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_x11_64/Godot_v${_pkgver}-rc${_pkgverb}_mono_x11.64" "${pkgdir}/opt/godot/godotlts-stable-rc-mono-bin.d/godotlts-stable-rc-mono-bin"
	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_x11_64/GodotSharp" "${pkgdir}/opt/godot/godotlts-stable-rc-mono-bin.d/GodotSharp"
	ln -s "/opt/godot/godotlts-stable-rc-mono-bin.d/godotlts-stable-rc-mono-bin" "${pkgdir}/opt/godot/godotlts-stable-rc-mono-bin"
	
	install -d "${pkgdir}/usr/bin/"
	ln -s "/opt/godot/godotlts-stable-rc-mono-bin.d/godotlts-stable-rc-mono-bin" "${pkgdir}/usr/bin/godotlts-stable-rc-mono-bin"
	
	install -d "${pkgdir}/usr/share/applications/"
	cat > "${pkgdir}/usr/share/applications/godotlts-stable-rc-mono-bin.desktop" <<-EOF
		[Desktop Entry]
		Name=Godot LTS Engine Stable Release Candidate Mono Binary v${_pkgver}-stable-rc${_pkgverb}
		GenericName="Advanced cross-platform 2D and 3D libre game engine. LTS Stable Release Candidate Mono Binary Version"
		Comment=Application for making games.
		Exec=/usr/bin/godotlts-stable-rc-mono-bin %U
		Icon=godot
		Terminal=false
		Type=Application
		MimeType=application/x-godot-project;
		Categories=Development;IDE;
	EOF
}

package_godotlts-stable-rc-mono-bin32(){
	pkgdesc+="${pkgdesclts} LTS Stable Release Candidate Mono Binary Version 32b"
	depends+=("${_monodepends}")
	groups+=(
		"godot-lts"
		"godot-mono"
		"godot-standard"
		"godot-standard32"
		"godot-32"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_x11_32/Godot_v${_pkgver}-rc${_pkgverb}_mono_x11.32" "${pkgdir}/opt/godot/godotlts-stable-rc-mono-bin32.d/godotlts-stable-rc-mono-bin32"
	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_x11_32/GodotSharp" "${pkgdir}/opt/godot/godotlts-stable-rc-mono-bin32.d/GodotSharp"
	ln -s "/opt/godot/godotlts-stable-rc-mono-bin32.d/godotlts-stable-rc-mono-bin32" "${pkgdir}/opt/godot/godotlts-stable-rc-mono-bin32"
	
	install -d "${pkgdir}/usr/bin/"
	ln -s "/opt/godot/godotlts-stable-rc-mono-bin32.d/godotlts-stable-rc-mono-bin32" "${pkgdir}/usr/bin/godotlts-stable-rc-mono-bin32"
	
	install -d "${pkgdir}/usr/share/applications/"
	cat > "${pkgdir}/usr/share/applications/godotlts-stable-rc-mono-bin32.desktop" <<-EOF
		[Desktop Entry]
		Name=Godot LTS Engine Stable Release Candidate Mono Binary v${_pkgver}-stable-rc${_pkgverb} 32b
		GenericName="Advanced cross-platform 2D and 3D libre game engine. LTS Stable Release Candidate Mono Binary Version 32b"
		Comment=Application for making games.
		Exec=/usr/bin/godotlts-stable-rc-mono-bin32 %U
		Icon=godot
		Terminal=false
		Type=Application
		MimeType=application/x-godot-project;
		Categories=Development;IDE;
	EOF
}

package_godotlts-stable-rc-mono-export-templates-bin(){
	pkgdesc+="${pkgdesclts} LTS Stable Release Candidate Export Templates Mono Binary Version"
	groups+=(
		"godot-lts"
		"godot-mono"
		"godot-export-templates"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_export_templates.tpz" "${pkgdir}/opt/godot/godotlts-stable-rc-mono-export-templates-bin.tpz"
}

package_libgodotlts-stable-rc-mono-bin(){
	pkgdesc+="${pkgdesclts} LTS Stable Release Candidate LibGodot Mono Binary Version"
	groups+=(
		"godot-lts"
		"godot-mono"
		"godot-lib"
	)
	install -Dm755 "${srcdir}/godot-lib.${_pkgver}.rc${_pkgverb}.mono.release.aar" "${pkgdir}/opt/godot/godot-lib/libgodotlts-stable-rc-mono-bin.aar"
}

package_godotlts-stable-rc-headless-mono-bin(){
	pkgdesc+="${pkgdesclts} LTS Stable Release Candidate Headless Mono Binary Version"
	depends+=("${_monodepends}")
	groups+=(
		"godot-lts"
		"godot-mono"
		"godot-headless"
		"godot-64"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_headless_64/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_headless.64" "${pkgdir}/opt/godot/godotlts-stable-rc-headless-mono-bin.d/godotlts-stable-rc-headless-mono-bin"
	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_headless_64/GodotSharp" "${pkgdir}/opt/godot/godotlts-stable-rc-headless-mono-bin.d/GodotSharp"
	ln -s "/opt/godot/godotlts-stable-rc-headless-mono-bin.d/godotlts-stable-rc-headless-mono-bin" "${pkgdir}/opt/godot/godotlts-stable-rc-headless-mono-bin"

	install -d "${pkgdir}/usr/bin/"
	ln -s "/opt/godot/godotlts-stable-rc-headless-mono-bin.d/godotlts-stable-rc-headless-mono-bin" "${pkgdir}/usr/bin/godotlts-stable-rc-headless-mono-bin"
	
	install -d "${pkgdir}/usr/share/applications/"
	cat > "${pkgdir}/usr/share/applications/godotlts-stable-rc-headless-mono-bin.desktop" <<-EOF
		[Desktop Entry]
		Name=Godot LTS Headless Engine Stable Release Candidate Mono Binary v${_pkgver}-stable-rc${_pkgverb}
		GenericName="Advanced cross-platform 2D and 3D libre game engine. LTS Stable Release Candidate Headless Mono Binary Version"
		Comment=Application for making games
		Exec=/usr/bin/godotlts-stable-rc-headless-mono-bin %U
		Icon=godot
		Terminal=false
		Type=Application
		MimeType=application/x-godot-project;
		Categories=Development;IDE;
	EOF
}

package_godotlts-stable-rc-server-mono-bin(){
	pkgdesc+="${pkgdesclts} LTS Stable Release Candidate Server Mono Binary Version"
	depends+=("${_monodepends}")
	groups+=(
		"godot-lts"
		"godot-mono"
		"godot-server"
		"godot-64"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_server_64/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_server.64" "${pkgdir}/opt/godot/godotlts-stable-rc-server-mono-bin.d/godotlts-stable-rc-server-mono-bin"
	install -d "${pkgdir}/opt/godot/godotlts-stable-rc-server-mono-bin.d/GodotSharp"
	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_server_64/data_Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_server_64" "${pkgdir}/opt/godot/godotlts-stable-rc-server-mono-bin.d/GodotSharp"
	ln -s "/opt/godot/godotlts-stable-rc-server-mono-bin.d/godotlts-stable-rc-server-mono-bin" "${pkgdir}/opt/godot/godotlts-stable-rc-server-mono-bin"
	
	install -d "${pkgdir}/usr/bin/"
	ln -s "/opt/godot/godotlts-stable-rc-server-mono-bin.d/godotlts-stable-rc-server-mono-bin" "${pkgdir}/usr/bin/godotlts-stable-rc-server-mono-bin"
	
	install -d "${pkgdir}/usr/share/applications/"
	cat > "${pkgdir}/usr/share/applications/godotlts-stable-rc-server-mono-bin.desktop" <<-EOF
		[Desktop Entry]
		Name=Godot Server Engine Stable Release Candidate Mono Binary v${_pkgver}-stable-rc${_pkgverb}
		GenericName="Advanced cross-platform 2D and 3D libre game engine. LTS Stable Release Candidate Server Mono Binary Version"
		Comment=Application for making games
		Exec=/usr/bin/godotlts-stable-rc-server-bin %U
		Icon=godot
		Terminal=false
		Type=Application
		MimeType=application/x-godot-project;
		Categories=Development;IDE;
	EOF
}

package_godotlts-stable-rc-mono-osx-bin(){
	pkgdesc+="${pkgdesclts} LTS Stable Release Candidate MacOSX Mono Binary Version"
	groups+=(
		"godot-lts"
		"godot-mono"
		"godot-osx"
		"godot-osx-universal"
	)
	install -Dm755 "${srcdir}/Godot_mono.app/Contents/MacOS/Godot" "${pkgdir}/opt/godot/godotlts-stable-rc-mono-osx-bin.d/godotlts-stable-rc-mono-osx-bin"
	cp -r "${srcdir}/Godot_mono.app/Contents/Resources/GodotSharp" "${pkgdir}/opt/godot/godotlts-stable-rc-mono-osx-bin.d/GodotSharp"
	ln -s "/opt/godot/godotlts-stable-rc-mono-osx-bin.d/godotlts-stable-rc-mono-osx-bin" "${pkgdir}/opt/godot/godotlts-stable-rc-mono-osx-bin"
	
}

package_godotlts-stable-rc-mono-win32-bin(){
	pkgdesc+="${pkgdesclts} LTS Stable Release Candidate Windows Mono Binary Version 32b"
	groups+=(
		"godot-lts"
		"godot-mono"
		"godot-win"
		"godot-win32"
		"godot-32"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32.exe" "${pkgdir}/opt/godot/godotlts-stable-rc-mono-win32-bin.d/godotlts-stable-rc-mono-win32-bin.exe"
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32_console.cmd" "${pkgdir}/opt/godot/godotlts-stable-rc-mono-win32-bin.d/godotlts-stable-rc-mono-win32-bin.cmd"
	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32/GodotSharp" "${pkgdir}/opt/godot/godotlts-stable-rc-mono-win32-bin.d/GodotSharp"
	ln -s "/opt/godot/godotlts-stable-rc-mono-win32-bin.d/godotlts-stable-rc-mono-win32-bin.exe" "${pkgdir}/opt/godot/godotlts-stable-rc-mono-win32-bin.exe"
	ln -s "/opt/godot/godotlts-stable-rc-mono-win32-bin.d/godotlts-stable-rc-mono-win32-bin.cmd" "${pkgdir}/opt/godot/godotlts-stable-rc-mono-win32-bin.cmd"
}

package_godotlts-stable-rc-mono-win64-bin(){
	pkgdesc+="${pkgdesclts} LTS Stable Release Candidate Windows Mono Binary Version 64b"
	groups+=(
		"godot-lts"
		"godot-mono"
		"godot-win"
		"godot-win64"
		"godot-64"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64.exe" "${pkgdir}/opt/godot/godotlts-stable-rc-mono-win64-bin.d/godotlts-stable-rc-mono-win64-bin.exe"
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64_cmd.cmd" "${pkgdir}/opt/godot/godotlts-stable-rc-mono-win64-bin.d/godotlts-stable-rc-mono-win64-bin.cmd"
	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64/GodotSharp" "${pkgdir}/opt/godot/godotlts-stable-rc-mono-win64-bin.d/GodotSharp"
	ln -s "/opt/godot/godotlts-stable-rc-mono-win64-bin.d/godotlts-stable-rc-mono-win64-bin.exe" "${pkgdir}/opt/godot/godotlts-stable-rc-mono-win64-bin.exe"
	ln -s "/opt/godot/godotlts-stable-rc-mono-win64-bin.d/godotlts-stable-rc-mono-win64-bin.cmd" "${pkgdir}/opt/godot/godotlts-stable-rc-mono-win64-bin.cmd"
}

